package com.jian.java.service;

import com.jian.java.entities.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author Jiange
 * @create 2021-06-01-17:21
 */
@FeignClient(value = "DEPT",fallbackFactory = DeptFallbackFactory.class)
public interface DeptService {
    @GetMapping("/dept/add")
    public boolean add(Dept dept);

    @GetMapping("/dept/getall")
    public List<Dept> getAll();

    @GetMapping("/dept/get/{id}")
    public Dept get(@PathVariable("id") int id);
}
